package cn.zust.itcost.repository;

import cn.zust.itcost.entity.graph.node.ResumeNode;
import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.data.neo4j.repository.query.Query;
import org.springframework.data.repository.query.Param;
import java.util.List;

public interface ResumeRepository extends Neo4jRepository<ResumeNode, Long> {
    
    @Query("MATCH (r:Resume) WHERE r.content CONTAINS $keyword RETURN r")
    List<ResumeNode> findByContentContaining(@Param("keyword") String keyword);
    
    @Query("MATCH (r:Resume)-[:HAS_SKILL]->(s:Skill) WHERE s.name = $skillName RETURN r")
    List<ResumeNode> findBySkill(@Param("skillName") String skillName);
    
    @Query("MATCH (r:Resume)-[:HAS_EDUCATION]->(e:Education) WHERE e.school = $school RETURN r")
    List<ResumeNode> findBySchool(@Param("school") String school);
    
    @Query("MATCH (r:Resume)-[:HAS_EXPERIENCE]->(e:Experience) WHERE e.company = $company RETURN r")
    List<ResumeNode> findByCompany(@Param("company") String company);
} 